# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_Asset do
  @moduledoc """
  Asset is a part of an ad which can be shared across multiple ads. It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc. Assets are immutable and cannot be removed. To stop an asset from serving, remove the asset from the entity that is using it.

  ## Attributes

  *   `callAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedCallAsset.t`, *default:* `nil`) - Output only. A unified call asset.
  *   `callToActionAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_CallToActionAsset.t`, *default:* `nil`) - Immutable. A call to action asset.
  *   `calloutAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedCalloutAsset.t`, *default:* `nil`) - Output only. A unified callout asset.
  *   `creationTime` (*type:* `String.t`, *default:* `nil`) - Output only. The timestamp when this asset was created. The timestamp is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss" format.
  *   `engineStatus` (*type:* `String.t`, *default:* `nil`) - Output only. The Engine Status for an asset.
  *   `finalUrls` (*type:* `list(String.t)`, *default:* `nil`) - A list of possible final URLs after all cross domain redirects.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Output only. The ID of the asset.
  *   `imageAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_ImageAsset.t`, *default:* `nil`) - Output only. An image asset.
  *   `lastModifiedTime` (*type:* `String.t`, *default:* `nil`) - Output only. The datetime when this asset was last modified. The datetime is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss.ssssss" format.
  *   `locationAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedLocationAsset.t`, *default:* `nil`) - Output only. A unified location asset.
  *   `mobileAppAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_MobileAppAsset.t`, *default:* `nil`) - A mobile app asset.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Optional name of the asset.
  *   `pageFeedAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedPageFeedAsset.t`, *default:* `nil`) - Output only. A unified page feed asset.
  *   `resourceName` (*type:* `String.t`, *default:* `nil`) - Immutable. The resource name of the asset. Asset resource names have the form: `customers/{customer_id}/assets/{asset_id}`
  *   `sitelinkAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedSitelinkAsset.t`, *default:* `nil`) - Output only. A unified sitelink asset.
  *   `status` (*type:* `String.t`, *default:* `nil`) - Output only. The status of the asset.
  *   `textAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_TextAsset.t`, *default:* `nil`) - Output only. A text asset.
  *   `trackingUrlTemplate` (*type:* `String.t`, *default:* `nil`) - URL template for constructing a tracking URL.
  *   `type` (*type:* `String.t`, *default:* `nil`) - Output only. Type of the asset.
  *   `youtubeVideoAsset` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_YoutubeVideoAsset.t`, *default:* `nil`) - Immutable. A YouTube video asset.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :callAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedCallAsset.t()
            | nil,
          :callToActionAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_CallToActionAsset.t()
            | nil,
          :calloutAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedCalloutAsset.t()
            | nil,
          :creationTime => String.t() | nil,
          :engineStatus => String.t() | nil,
          :finalUrls => list(String.t()) | nil,
          :id => String.t() | nil,
          :imageAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_ImageAsset.t() | nil,
          :lastModifiedTime => String.t() | nil,
          :locationAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedLocationAsset.t()
            | nil,
          :mobileAppAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_MobileAppAsset.t() | nil,
          :name => String.t() | nil,
          :pageFeedAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedPageFeedAsset.t()
            | nil,
          :resourceName => String.t() | nil,
          :sitelinkAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedSitelinkAsset.t()
            | nil,
          :status => String.t() | nil,
          :textAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_TextAsset.t() | nil,
          :trackingUrlTemplate => String.t() | nil,
          :type => String.t() | nil,
          :youtubeVideoAsset =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_YoutubeVideoAsset.t()
            | nil
        }

  field(:callAsset,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedCallAsset
  )

  field(:callToActionAsset,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_CallToActionAsset
  )

  field(:calloutAsset,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedCalloutAsset
  )

  field(:creationTime)
  field(:engineStatus)
  field(:finalUrls, type: :list)
  field(:id)
  field(:imageAsset, as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_ImageAsset)
  field(:lastModifiedTime)

  field(:locationAsset,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedLocationAsset
  )

  field(:mobileAppAsset,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_MobileAppAsset
  )

  field(:name)

  field(:pageFeedAsset,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedPageFeedAsset
  )

  field(:resourceName)

  field(:sitelinkAsset,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_UnifiedSitelinkAsset
  )

  field(:status)
  field(:textAsset, as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_TextAsset)
  field(:trackingUrlTemplate)
  field(:type)

  field(:youtubeVideoAsset,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_YoutubeVideoAsset
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_Asset do
  def decode(value, options) do
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_Asset.decode(value, options)
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_Asset do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
